'''
/*
 * @Author: wevsmy 
 * @Date: 2017-10-23 17:00:49 
 * @Last Modified by: wevsmy
 * @Last Modified time: 2017-10-23 17:51:04
 */
'''
import os
import time
ret = os.fork()
print(ret)

if ret == 0:
    print("子进程%d-%d"%(os.getpid(),os.getppid()))
    time.sleep(3)
    print("子进程END",end="")
else:
    print("父进程%d"%os.getpid())
    time.sleep(2)

print("共同执行")

#父进程子进程执行的顺序不确定，要看操作系统的调度算法